import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    tagArr: [
      { label: '商户管理', url: 'channelProvider' }
    ]
  },
  mutations: {
    fixTag(state, obj) {
      let add = true
      this.state.tagArr.forEach((item, index) => {
        if (item.label === obj.label) {
          add = false
        }
      })
      if (add) {
        this.state.tagArr.push(obj)
      }
    }
  },
  actions: {

  },
})
